const moment = require('moment')
moment.locale('zh-cn')

export const formatTime = (time,format='YYYY-MM-DD HH:mm:ss') => {
	if(time){
		return moment(time).format(format)
	}else{
		return moment().format(format)
	}
}